home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
PTHMAN.ARJ
/
PATHMAN.DOC
next >
Wrap
Text File
|
1992-08-02
|
32KB
|
745 lines
---------------------------------------------------------------------------
0
| P A T H M A N V 1 . 0 5
o-<+>-o ----------------------------
| Path Management Utility for DOS
| Copyright(c)1992 by Anchor Software
<^ | ^> All Rights Reserved Worldwide
\_|_/
^ Anchor Software - P.O. Box 124 - Cheswick, PA 15024 - (412)274-6404
---------------------------------------------------------------------------
Professional Shareware - $15 Registration fee - Contact us for Site License
To register use the form provided on page 12 of this document.
Introduction:
PATHMAN is a program designed to provide a logical extension to
DOS's PATH command and environment variable by simplifying the editing
and management of the DOS search path. A basic approach to adding and
removing directories as well as the extension of the search path
beyond the 127 byte limit allows PATHMAN to open the DOS PATH for use
in 90's network and Windows computing.
These capabilities are great for network administrators who
create menuing systems and batch files for users, developers and
analysts who need to modify their path to test and/or debug new
software, and for any serious PC user. And best of all it works just
like the PATH command you already use.
Typically, the limit of your PATH environment variable is
confined to the length of a line provided by the command
processor(COMMAND.COM).
Excerpt from the "Microsoft MS-DOS Operating
System version 5.0 User's Guide and Reference"
"...Length limit for the path command
The maximum length of the path command is 127
characters. To fit more directories in the search
path, you can shorten directory names, use the
subst command to redirect directories to logical
drives (which shortens the entries on the path
command line), or use the append/x:on command."
At Anchor we have discovered that the DOS search path can
actually be as large as the active DOS environment. That is, if you so
desire you could allocate a 32K environment and grow your search path
to that size. Of course this is severely impractical. Our point is
that the search path can actually be longer than the 127 characters
mentioned above. The problem is that there has really be no means to
put a path into the environment longer than 127 bytes since DOS's PATH
command is limited to the length of the command line provided by
COMMAND.COM. Granted, PATHMAN is also limited by the 127 byte command
line, however, PATHMAN is able to add to an existing path not just
replace it. PATHMAN can also read paths from a file, in which case the
path can exceed the 127 byte limit.
PATHMAN v1.05 by Anchor Software Page 1
We realize deliberately extending the PATH beyond the documented
limit, might cause some uneasiness over compatibility issues, however
we have not experienced any problems to the date of this publication.
In any event, PATHMAN provides you with the tools you need to easily
update, edit, save, and restore one or multiple search paths so the
length of your path is left up to you. In other words, you don't have
to exceed the DOS limit unless you want to. PATHMAN lets you decide.
PATHMAN is particularly handy, now that more and more PC's are
networked to potentially multiple servers with large disk volumes that
have intricate directory structures used for program and data storage.
PATHMANs + and - features let you simply add and remove
directories from your path. The save and restore features let you
modify and restore the path on the fly without having to check for
available environment space. This is done by saving the path to a file
instead of to another temporary environment variable. You can even
save to and from the file of your choice and you can edit the file in
any ASCII editor to boot. In addition, with PATHMANs /c and /d options
you eliminate invalid and redundant drives and directories from your
path with a single command.
So if you are a serious PC user using DOS and or Windows and on a
network we're sure PATHMAN can help you.
Look for more innovative utilities for DOS, Windows, and networks
from Anchor Software.
PATHMAN v1.05 by Anchor Software Page 2
Installation:
To install PATHMAN simply copy PATHMAN.EXE to your \DOS or your
"utilities" subdirectory. Where "utilities" is any directory currently
in your path where you keep your DOS utilities.
Command Reference:
Syntax: PATHMAN [[drive:]path[;...]]
PATHMAN - To show the current path. This will display the
search path similar to the way DOS does it
with a few additions. You are notified of any
invalid or redundant directories. Also the
current size of the path in bytes is
displayed as well as the maximum size of path
that the current DOS environment support. (To
increase your environment size modify the /e
parameter on the shell command in you
config.sys file. "shell=C:\dos\command.com
/e:512 /p". For more information on the shell
command see your DOS manual.)
PATHMAN "path" - To set normal DOS path. Where "path" is of the
form [[drive:]path[;...]]
PATHMAN +"path" - To append to the current path. Where "path" is
of the form [[drive:]path[;...]]. Any invalid
directories specified in "path" will not be
added to your search path. All valid
directories are added to the end of the
current DOS search path.
PATHMAN -"path" - To remove part of the current path. Where "path"
is of the form [[drive:]path[;...]]. The
search path is parsed for a match to each
directory you specify. For example, say your
path is PATH=C:\;C:\util;C:\dos and you
wanted to remove the reference to C:\ you
would type PATHMAN -C:\. If you wanted to
remove C:\ and C:\dos you could type
PATHMAN -C:\;C:\DOS.
PATHMAN ^"path" - To insert "path" at the beginning of the current
path. Only those directories in "path" that
are valid will be inserted. Invalid
directories are skipped.
PATHMAN @filename - To read the path from a file either created by
PATHMAN or an ASCII editor. The file should
contain one directory name per line. The size
of the file is limited only by the maximum
size of path that your active DOS environment
can handle. (See Appendix A for a sample
PATHMAN file.)
PATHMAN v1.05 by Anchor Software Page 3
PATHMAN +@filename - To append the directories listed in the file to
the path. (See Appendix A for a sample
PATHMAN file.)
PATHMAN -@filename - To remove the directories listed in the file
from the search path. (See Appendix A for a
sample PATHMAN file.)
PATHMAN ^@filename - To insert the directories listed in the file at
the beginning of the search path. (See
Appendix A for a sample PATHMAN file.)
PATHMAN /s - To save the current path. This option works in
conjunction with the /r option to provide
quick save and restore functions to the path.
When you execute this option PATHMAN saves
the current search path to an ASCII file. The
file is saved to the root directory of your
C: drive and is called PATHMAN.SVD by
default. To have PATHMAN save the file to
another drive or subdirectory use the DOS SET
command to set the TEMP environment variable
to the drive and directory you wish. For
example: set TEMP=D:\temp.
PATHMAN /s=filename - To save the current path to a file. This option
lets you specify the file to which you want
the path saved.
(Example: PATHMAN/s=C:\mypath.txt ). The file
saved can be modified by any ASCII editor.
The format of the file is one directory per
line.
PATHMAN /r - To restore from a saved path. This option works
in conjunction with the /s option to provide
quick save and restore functions to the path.
When you execute this option PATHMAN replaces
the current path with the path previously
saved by the PATHMAN/s command. As in the /s
command PATHMAN uses the file PATHMAN.SVD in
the root directory on your C: drive as the
default, unless you have the TEMP environment
variable set to some other location.
PATHMAN /c - To clear invalid directories from the path.
PATHMAN verifies the integrity of all
directories in your search path. If an
invalid directory is detected you are
notified however no action is taken. The /c
option removes all references to any invalid
directories from your path. This is handy in
a network environment when a server drops
your connection and you still have references
to network drives in your path.
PATHMAN /d - To clear redundant directories from the path.
PATHMAN verifies whether redundant directory
PATHMAN v1.05 by Anchor Software Page 4
entries exist in your search path. If a
redundant directory is detected you are
notified however no action is taken. The /d
option removes all references to any
redundant directories from your path. Having
redundant directories in your path will slow
down your system since the same directory
would be searched more than once for a
particular command.
PATHMAN /x - To set the path to NULL. That is, remove all
entries from the PATH environment variable
such that the DOS PATH command gives you the
"No Path" message.
Multiple switches can be used on the same command line. For example you
could enter :
PATHMAN +C:\windows;C:\util -C:\dbase /s=C:\test.pth
This would add C:\windows and C:\util, remove C:\dbase, and then save the
path to the file called test.pth. Please note that the switches are
processed in the order that they appear on the command line and each switch
must be separated by a space.
CAVEAT:
You CANNOT set the path with PATHMAN with the following syntax:
PATHMAN=C:\;C:\dos;C:\util
PATHMAN does not recognize the "=" (equal sign) and will return the
error message: "Invalid stack override directive".
PATHMAN v1.05 by Anchor Software Page 5
RETURN CODES: Values returned in ERRORLEVEL.
0 - Successful completion of all operations requested.
1 - Not enough memory for PATHMAN dynamic memory allocation.
This error occurs when PATHMAN does not have sufficient free
DOS memory to allocate the buffers necessary to perform the
requested operation.
2 - Internal Error. This is normally caused by a memory
corruption by some other program.
3 - Not enough room in environment. This error is returned if a
request is made to add more directories to the path than the
current command environment can handle. To remedy this
situation the environment size must be increased by
modifying the /E: parameter on the SHELL command in your
config.sys file.
4 - Cannot read file. An invalid file was specified. PATHMAN
does verification of any file specified to be read as a
saved path file. PATHMAN also verifies each directory
before it is placed into your path so that incorrect
information is not stored in the path.
5 - Cannot write to a file. PATHMAN encountered problems
creating a file while saving the path. This normally results
from an invalid file specification or insufficient disk
space.
6 - Wrong DOS Version. This is returned if the DOS version
encountered is not directly supported by PATHMAN. Version
checking can be disabled.(See the compatibility section
later in this document.)
PATHMAN v1.05 by Anchor Software Page 6
SUGGESTED CONVENTION:
When you save your path to a file we suggest using a .PTH extension as
a convention. A future release will have features designed around this
convention.
DIRECTORY SORT ORDER:
The order in which your directories are searched has an effect on the
speed of your system. There are two directory ordering methods to
consider.
a. Order by the speed of the access times of your devices. That is
order your path such that your fastest disk drives are first. For
example, place any references to your hard disk before any
reference to floppy devices. On a network, you would probably
want to place references to your local drives (hard disks,
etc..)first, then references to the network drives.
b. Order by the most frequently accessed directories. For example,
if you get DOS from the network, use a menuing system that calls
a lot of batch files from one directory, or use one application
far more than any other. Put those directories first then use the
sort by speed method for the remaining directories in the path.
In addition, performance can be affected by the length of the path
since all of the directories in the path are searched until a program
is found. Depending on your requirements you might prefer to save a
number of short paths and switch between them or use batch files to
dynamically add(+ or ^) and remove(-) directories only when needed.
USE WITH MICROSOFT WINDOWS:
If you are using Windows to access the DOS prompt be aware that the
environment that you access in the DOS window is a subprocess of the
original command environment. Thus that process has inherited a copy
of the environment from the Windows process. When this is done in DOS
only enough memory is allocated in the subprocess to accommodate the
size of the current environment, not necessarily the size specified on
your shell command in config.sys. So you may experience problems
trying to grow your search path in the DOS window. The same holds
true for any program that gives you access to the DOS prompt without
exiting, that is a second version of command.com is loaded and this
version inherits a copy of the environment including the path variable
and only enough memory is allocated for what is currently in use. To
allow more environment space in Windows edit the properties of your
DOS prompt icon and add /E:xxxx to the command line where xxxx is the
number of bytes you want allocated to your DOS session's environment.
Furthermore, PATHMAN is a DOS program. So if you try to run PATHMAN
from Windows, Windows will first open a DOS session for PATHMAN to run
in. That is, as described above, Windows creates a subprocess of the
Windows process and passes a copy of the environment to that
subprocess. So any changes to the PATH variable will only take effect
in that subprocess. In other words, running PATHMAN from Windows will
appear to have no effect. You must exit Windows and run PATHMAN from
PATHMAN v1.05 by Anchor Software Page 7
the DOS prompt and then restart Windows to effect the path that
Windows uses to search for programs. (Development of a Windows version
of PATHMAN is in the R&D phase.)
DOS . (CURRENT) and .. (PARENT) DIRECTORY SPECIFICATIONS
Depending on your version of DOS, PATHMAN's directory verification
routines may not permit you to use certain implementations of the .
and .. directory specification. However, the standard Novell search
drive specification is always supported. (D:. where D is any valid
drive letter)
AUTOEXEC.BAT
We suggest that you keep a modest PATH statement in you autoexec.bat
file since so many programs installation procedures automatically
update your PATH statement in autoexec. Immediately following this
PATH statement place your call to the PATHMAN program.
For Example:
PATH C:\DOS;C:\UTIL
PATHMAN +@autoexec.pth
BATCH FILES AND THE %PATH% BATCH VARIABLE:
As a general rule when using a longer path the %PATH% batch file
variable should be avoided since unwanted truncation of the path can
occur.
For example a command like PATH C:\stuff;%PATH% in a batch file would
truncate your path at the 127 byte mark. %PATH% would be expanded when
the batch file is run potentially supplying a line to the command
processor longer than 127 bytes. Anything beyond 127 bytes per command
in a batch file is ignored so your path could get truncated. You can
easily replace this command with PATHMAN ^C:\stuff to get the same
result and maintain your long path.
A common method used by programs that start with a batch file is to
save your path using the DOS SET command to another environment
variable:
SET YPATH=%PATH%
Then add to the path or change it all together using a PATH command:
PATH C:\prog;%PATH%
Run the program and then restore your path using the command:
PATH %YPATH%
This whole scenario works fine as long as your path does not exceed
127 bytes. Unfortunately, if your path is long it could be truncated.
The PATHMAN commands to perform this same function avoiding any chance
of truncation are compared below to the conventional batch commands:
PATHMAN v1.05 by Anchor Software Page 8
Without PATHMAN With PATHMAN
------------------------------------------------------
SET YPATH=%PATH% | PATHMAN /s
PATH C:\prog;%PATH% | PATHMAN ^C:\prog
prog | prog
path %YPATH% | PATHMAN /r
SET YPATH= |
| -or more simply-
|
| PATHMAN ^C:\prog
| prog
| PATHMAN -C:\prog
PATHMAN v1.05 by Anchor Software Page 9
COMPATIBILITY:
PATHMAN has been tested with
MS-DOS versions 3.3, 4.0, and 5.0.
DR DOS version 5.0
DEC Pathworks versions 3.0, 4.0, and 4.1.
Novell NetWare workstation shells.
PATHMAN will not run if a DOS version other than one of those listed
above is detected. DOS version checking can be disabled by setting the
DVC environment variable to NO (SET DVC=NO). Keep in mind that running
PATHMAN without DOS version checking can cause unpredictable results.
APPENDIX A: Sample PATHMAN file.
Files read and written by PATHMAN consist of one directory name per
line, one directory followed by a carriage return and linefeed then
another directory.
For example:
C:\
C:\DOS
C:\UTIL
C:\WINDOWS
C:\DBASE4
C:\WORD5
PATHMAN v1.05 by Anchor Software Page 10
DISCLAIMER:
"PATHMAN is supplied as is. The author disclaims all warranties,
expressed or implied, including, without limitation, the warranties of
merchantability and of fitness for any purpose. The author assumes no
liability for damages, direct or consequential, which may result from
the use of PATHMAN. In no event shall the author's liability for any
damages ever exceed the price paid for the license to use the software
regardless of the form of the claim."
LICENSING (REGISTERING):
You may use PATHMAN for a free 15 day trial period. If you
continue to use PATHMAN after the 15 day trial period, you are
required to register your copy of PATHMAN and obtain a license number.
When you register PATHMAN you will be given a license number and sent
a disk with the latest version of PATHMAN. To register your copy of
PATHMAN send $15 check or money order to Anchor Software, P.O. BOX
124, Cheswick, PA 15024. The registration fee will license one copy
for use on any one computer at any one time.
Site-License arrangements may be made by contacting Anchor
Software. Any parties interested in distributing PATHMAN with their
products should also contact Anchor Software.
We encourage you to pass a copy of PATHMAN along to your friends
and associates for evaluation. Please encourage them to register
their copy if they find that they can use it. All registered users
will receive a copy of the latest version of PATHMAN.
TRADEMARK ACKNOWLEDGEMENTS
Microsoft, MS-DOS, and Microsoft Windows are trademarks of Microsoft
Corporation.
DEC, and Pathworks are trademarks of Digital Equipment Corporation.
Novell, and NetWare are trademarks of Novell Inc.
DR DOS is a trademark of Digital Research Inc.
All other trademarks are the property of their holders.
TECHNICAL SUPPORT
Please direct all questions or comments about PATHMAN Path Management
Utility for DOS to:
Mail: Anchor Software
P.O. Box 124
Cheswick, PA 15024
Phone: (412) 274-6404
Fax: (412) 274-5010
CompuServe: 75230,3055
PATHMAN v1.05 by Anchor Software Page 11
---------------------------------------------------------------------------
0
| P A T H M A N V 1 . 0 5
o-<+>-o ----------------------------
| Path Management Utility for DOS
| Copyright(c)1992 by Anchor Software
<^ | ^> All Rights Reserved Worldwide
\_|_/
^ Anchor Software - P.O. Box 124 - Cheswick, PA 15024 - (412)274-6404
---------------------------------------------------------------------------
REGISTRATION FORM
PATHMAN V1.05
NAME______________________________________________
COMPANY___________________________________________
0 0
| STREET____________________________________________ |
o-<+>-o o-<+>-o
| CITY______________________________________________ |
| |
<^ | ^> STATE_________________________ ZIP____________ <^ | ^>
\_|_/ \_|_/
^ TELEPHONE_____________________ DATE____________ ^
Diskette format (choose one) 5.25"_____ 3.5"_____
PATHMAN V1.05 Registration.....................$15.00...______
Site license info available by calling Anchor Software.
Pennsylvania residents add 6% sales tax.................______
Please add $3.50 shipping & handling....................______
($5.00 outside the United States and Canada)
Total Amount Enclosed...................................______
Terms:
Check or Money Order in United States currency. All licenses are
prepaid. Make checks or money orders payable to: Anchor
Software.
Where did you get your copy of PATHMAN ?____________________________
What type of computer, operating system, and network do you use ?
____________________________________________________________________
____________________________________________________________________
Comments:___________________________________________________________
____________________________________________________________________
____________________________________________________________________
PATHMAN v1.05 by Anchor Software Page 12
---------------------------------------------------------------------------
0
| P R I M E N V V 1 . 0 0
o-<+>-o ----------------------------
| The Primary DOS Environment Function Library for C
| Copyright(c)1992 by Anchor Software
<^ | ^> All Rights Reserved Worldwide
\_|_/
^ Anchor Software - P.O. Box 124 - Cheswick, PA 15024 - (412)274-6404
---------------------------------------------------------------------------
PRODUCT DESCRIPTION:
"The Primary DOS Environment Function Library for C" gives you the ability
to access and modify any part of the primary DOS environment from your
executable C programs. The primary environment is the original environment
supplied to COMMAND.COM and is not the copy of the environment passed to
your executable programs. The primary environment is the environment
immediately effected by DOS's SET, PATH, and PROMPT commands. This means
you can modify any existing environment variable as well as add variables
of your own from your executable C programs and have those changes remain
in effect once your program terminates. From creating custom installation
programs to program-to-program communication this library will prove to be
a useful addition to any C programmers toolkit. The library is only
available directly from Anchor Software. Use this form to order PRIMENV.
---------------------------------------------------------------------------
ORDER FORM PRIMENV V1.00
NAME______________________________________________
COMPANY___________________________________________
0 0
| STREET____________________________________________ |
o-<+>-o o-<+>-o
| CITY______________________________________________ |
| |
<^ | ^> STATE_________________________ ZIP____________ <^ | ^>
\_|_/ \_|_/
^ TELEPHONE_____________________ DATE____________ ^
Diskette format (choose one) 5.25"_____ 3.5"_____
Compiler (choose one) Microsoft_____ Lattice_____
PRIMENV V1.00 Registration.....................$50.00...______
Pennsylvania residents add 6% sales tax.................______
Please add $3.50 shipping & handling....................______
($5.00 outside the United States and Canada)
Total Amount Enclosed...................................______
Terms:
Check or Money Order in United States currency. All licenses are
prepaid. Make checks or money orders payable to: Anchor
Software.
---------------------------------------------------------------------------
PATHMAN v1.05 by Anchor Software Page 13